<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
    <meta name="keywords" content="百度地图,百度地图API，百度地图自定义工具，百度地图所见即所得工具"/>
    <meta name="description" content="百度地图API自定义地图，帮助用户在可视化操作下生成百度地图"/>
    <title>Document</title>
    <link href="css/swiper-3.4.2.min.css" rel="stylesheet">
    <link rel="stylesheet" href="font/iconfont.css">
    <link rel="stylesheet" href="css/animate.min.css">
    <link rel="stylesheet" href="css/index.css">
    <script src="js/jquery.js"></script>
    <script src="js/jquery.mousewheel.js"></script>
    <script src="js/swiper-3.4.2.min.js"></script>
    <script src="js/rem.js"></script>
    <script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.1&services=true"></script>
    <script src="js/swiper.animate1.0.2.min.js"></script>
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }

        .swiper-container {
            position: fixed;
            height: 100%;
            width: 100%;
            background: #EEEEEE;
        }

        html, body {
            margin: 0;
            padding: 0;
        }

        .iw_poi_title {
            color: #CC5522;
            font-size: 14px;
            font-weight: bold;
            /*overflow: hidden;*/
            padding-right: 13px;
            white-space: nowrap
        }

        .iw_poi_content {
            font: 12px arial, sans-serif;
            overflow: visible;
            padding-top: 4px;
            white-space: -moz-pre-wrap;
            word-wrap: break-word
        }
    </style>
</head>
<body>
<header class="clearfix head">
    <!--<div class="pagination"></div>-->
    <div class="logo">
        <a href="javascript:;">北京青核桃科技有限公司</a>
    </div>
    <div class="tiao">
        <ul class=" nav clearfix">
            <li class="bo">
                <a href="javascript:;" class="click_a">公司介绍</a>
            </li>
            <li class="fater">
                <a href="javascript:;" class="xila ">产品介绍 <i class="iconfont icon-xiala-copy"></i></a>
                <ul class="son" style="display: none;">
                    <li class="bo"><a href="javascript:;" class="click_a">π计划科技智能情报</a></li>
                    <li class="bo"><a href="javascript:;" class="click_a">π计划科技知识图谱</a></li>
                    <li class="bo"><a href="javascript:;" class="click_a">π计划科技科技专家智能推荐</a></li>
                    <li class="bo"><a href="javascript:;" class="click_a">π计划科技分析评估</a></li>
                </ul>
            </li>
            <li class="bo"><a href="javascript:;" class="click_a">战略合作伙伴</a></li>
            <li class="bo"><a href="javascript:;" class="click_a">联系我们</a></li>
        </ul>
    </div>
    <div class='Sign'><a href="html/Land.html">登录</a></div>
    <div class='zhuce'><a href="html/register.html">注册</a></div>
</header>
<div class="swiper-container swiper-container-father">
    <div class="swiper-wrapper home">
        <div class="swiper-slide slide1 fenye" id="silde1" value="0">
            <div class="swiper-container swiper-container-son">
                <div class="swiper-wrapper">
                    <div class="swiper-slide one"
                         style="background: url('img/banner01.png');background-size:cover;background-repeat: no-repeat;">
                        <!--<img src="img/1.png">-->
                        <div class="text">
                            基于覆盖全球科技成果的信息获取和处理能力
                        </div>
                        <div class="btn">
                            <a href="">进入π计划</a>
                        </div>
                    </div>
                    <div class="swiper-slide two"
                         style="background: url('img/banner02.png');background-size:cover;background-repeat: no-repeat;">
                        <!--<img src="img/2.png">-->
                        <div class="text">
                            融合人工智能、大数据技术的科技分析能力
                        </div>
                        <div class="btn">
                            <a href="">进入π计划</a>
                        </div>
                    </div>
                    <div class="swiper-slide three"
                         style="background: url('img/banner03.png');background-size:cover;background-repeat: no-repeat;">
                        <!--<img src="img/3.png">-->
                        <div class="text">
                            数据驱动的科技洞察能力
                        </div>
                        <div class="btn">
                            <a href="">进入π计划</a>
                        </div>
                    </div>
                    <div class="swiper-slide four"
                         style="background: url('img/banner04.png');background-size:cover;background-repeat: no-repeat;">
                        <!--<img src="img/4.png">-->
                        <div class="text">
                            成为全球领先的科技运营商
                        </div>
                        <div class="btn">
                            <a href="">进入π计划</a>
                        </div>
                    </div>
                    <div class="swiper-slide five"
                         style="background: url('img/banner05.png');background-size:cover;background-repeat: no-repeat;">
                        <!--<img src="img/5.png">-->
                        <div class="text">
                            让每一次创新都能站在巨人的
                        </div>
                        <div class="btn">
                            <a href="">进入π计划</a>
                        </div>
                    </div>
                </div>
                <div class="swiper-pagination"></div>
                <div class="swiper-pagination"></div>
                <div class="swiper-pagination"></div>
                <div class="swiper-pagination"></div>
                <div class="swiper-pagination"></div>
                <div class="swiper-pagination"></div>
            </div>
        </div>
        <div class="swiper-slide slide2 fenye" id="silde2" value="1">
            <div class="xbt">
                π计划科技智能情报
            </div>
            <div class='border'></div>
            <div class="content clearfix">
                <div class="img"><img src="img/cp-1.png" alt=""></div>
                <div class="text">
                    <p>以科技的方式和态度构建科技的洞察力</p>
                    <p style="">实现在全球范围内</p>
                    <p>发现、评估、合作、获取前沿科技资源</p>
                </div>
            </div>
            <div class="content2 clearfix">
                <div>
                    <p>自有科技资源</p>
                    <p>400 000 000<span>+</span></p>
                </div>
                <div>
                    <p>覆盖国家</p>
                    <p>100<span>+</span></p>
                </div>
            </div>
        </div>
        <div class="swiper-slide slide3 fenye" id="silde3" value="2">
            <div class="xbt">
                π计划科技知识点图谱
            </div>
            <div class='border'></div>
            <div class="content clearfix">
                <div class="text">
                    <p>我们为科技的"游牧民族"绘制科技地图</p>
                    <p>探索人类科技文明新边疆</p>
                </div>
                <div class="img"><img src="img/cp-2.png" alt=""></div>
            </div>
            <div class="content2 clearfix">
                <div>
                    <p>覆盖技术主题</p>
                    <p>300 000 000<span>+</span></p>
                </div>
                <div>
                    <p>覆盖学科领域</p>
                    <p>600<span>+</span></p>
                </div>
            </div>
        </div>
        <div class="swiper-slide slide4 fenye" id="silde4" value="3">
            <div class="xbt">
                π计划科技专家智能推荐
            </div>
            <div class='border'></div>
            <div class="content clearfix">
                <div class="img"><img src="img/cp-3.png" alt=""></div>
                <div class="text">
                    <p>通过对海量科技资源的数据挖掘</p>
                    <p>从20+纬度绘制专家学者、机构画像</p>
                    <p>构建精准的科技合作资源网络</p>
                </div>
            </div>
            <div class="content2 clearfix">
                <div>
                    <p>专家学者</p>
                    <p>200 000 000<span>+</span></p>
                </div>
                <div>
                    <p>覆盖学科领域</p>
                    <p>100 00<span>+</span></p>
                </div>
            </div>
        </div>
        <div class="swiper-slide slide5 fenye" id="silde5" value="4">
            <div class="xbt">
                π计划科技分析评估
            </div>
            <div class='border'></div>
            <div class="content clearfix">
                <div class="text">
                    <p>科技不是学术会议、论文、专利</p>
                    <p>是创造经济价值的动力和源泉</p>
                    <p>通过数据挖掘实现科技与产业的无缝链接</p>
                </div>
                <div class="img"><img src="img/cp-4.png" alt="" style="width: 12rem;"></div>
            </div>
            <div class="content2 clearfix">
                <div>
                    <p>专家学者</p>
                    <p>200 000 000<span>+</span></p>
                </div>
                <div>
                    <p>覆盖学科领域</p>
                    <p>100 00<span>+</span></p>
                </div>
            </div>
        </div>
        <div class="swiper-slide slide6 fenye" style="background: white" id="silde6" value="5">
            <div class="xbt">
                战略合作伙伴
            </div>
            <div class='border'></div>
            <ul class="college clearfix">
                <li><img src="img/1-a.png" alt=""></li>
                <li><img src="img/2-b.png" alt=""></li>
                <li><img src="img/3-c.png" alt=""></li>
                <li><img src="img/4-d.png" alt=""></li>
                <li><img src="img/5-e.png" alt=""></li>
                <li><img src="img/6-f.png" alt=""></li>
                <li><img src="img/7-g.png" alt=""></li>
                <li><img src="img/8-h.png" alt=""></li>
            </ul>
        </div>
        <div class="swiper-slide slide7 fenye" id="silde7" value="6">
            <div class="xbt">
                联系我们
            </div>
            <div class='border'></div>
            <div class="lxwm clearfix">
                <div class="map">
                    <div style="width:10rem;height:9rem;" id="dituContent"></div>
                </div>
                <div class="tel">
                    <p>
                        <i class="iconfont icon-tonghua"></i>
                        <span>+86 010-8845-1901</span>
                    </p>
                    <p>
                        <i class="iconfont icon-duanxin"></i>
                        <span>bushiness@piionee.com</span>
                    </p>
                    <p>
                        <i class="iconfont icon-dibiao"></i>
                        <span>北京海淀区琨御府8座2-111</span>
                    </p>
                    <div class="inp clearfix">
                        <div>
                            <input type="text" placeholder="您的姓名" class="name">
                        </div>
                        <div style="margin-left: 0.3rem">
                            <input type="text" placeholder="您的联系方式" class="phone">
                        </div>
                    </div>
                    <textarea placeholder="写下你的建议和意见" class="msg"></textarea>
                    <div class="tijiao">
                        <a href="javascript:;">提交</a>
                    </div>
                </div>
            </div>
            <div class="footer">
            </div>
        </div>
    </div>
</div>
<script>
    var swiperIndex = sessionStorage.getItem('swiperIndex') ? sessionStorage.getItem('swiperIndex') : 0,
            initSwiper = {
                direction: 'vertical',
                initialSlide: swiperIndex,
//                mousewheelControl: true,
                speed: 400,
                mode: 'vertical',
                resistance: '100%',
                loop: false,
                grabCursor: true,
//                pagination: '.pagination',
//                paginationClickable: true,
                watchSlidesVisibility: true,
                // 切换页面成功之前的回调
                onSlideChangeStart: function (swiper) {
                    sessionStorage.setItem('swiperIndex', swiper.activeIndex);
                }
            };
    var swiperFather = new Swiper('.swiper-container-father', initSwiper);
    var swiperSon = new Swiper('.swiper-container-son', {
        autoplay: 3000,
        loop: true,
        pagination: '.swiper-pagination',
        paginationClickable: true,
    });
    //创建和初始化地图函数：
    function initMap() {
        createMap();//创建地图
        setMapEvent();//设置地图事件
        addMapControl();//向地图添加控件
        addMarker();//向地图中添加marker
    }

    //创建地图函数：
    function createMap() {
        var map = new BMap.Map("dituContent");//在百度地图容器中创建一个地图
        var point = new BMap.Point(116.294011, 39.939353);//定义一个中心点坐标
        map.centerAndZoom(point, 17);//设定地图的中心点和坐标并将地图显示在地图容器中
        window.map = map;//将map变量存储在全局
    }

    //地图事件设置函数：
    function setMapEvent() {
        map.enableDragging();//启用地图拖拽事件，默认启用(可不写)
        map.enableScrollWheelZoom();//启用地图滚轮放大缩小
        map.enableDoubleClickZoom();//启用鼠标双击放大，默认启用(可不写)
        map.enableKeyboard();//启用键盘上下左右键移动地图
    }

    //地图控件添加函数：
    function addMapControl() {
        //向地图中添加缩放控件
        var ctrl_nav = new BMap.NavigationControl({anchor: BMAP_ANCHOR_TOP_LEFT, type: BMAP_NAVIGATION_CONTROL_LARGE});
        map.addControl(ctrl_nav);
        //向地图中添加缩略图控件
        var ctrl_ove = new BMap.OverviewMapControl({anchor: BMAP_ANCHOR_BOTTOM_RIGHT, isOpen: 1});
        map.addControl(ctrl_ove);
        //向地图中添加比例尺控件
        var ctrl_sca = new BMap.ScaleControl({anchor: BMAP_ANCHOR_BOTTOM_LEFT});
        map.addControl(ctrl_sca);
    }

    //标注点数组
    var markerArr = [{
        title: "我的位置",
        content: "我的备注",
        point: "116.294011|39.939353",
        isOpen: 0,
        icon: {w: 21, h: 21, l: 0, t: 0, x: 6, lb: 5}
    }
    ];
    //创建marker
    function addMarker() {
        for (var i = 0; i < markerArr.length; i++) {
            var json = markerArr[i];
            var p0 = json.point.split("|")[0];
            var p1 = json.point.split("|")[1];
            var point = new BMap.Point(p0, p1);
            var iconImg = createIcon(json.icon);
            var marker = new BMap.Marker(point, {icon: iconImg});
            var iw = createInfoWindow(i);
            var label = new BMap.Label(json.title, {"offset": new BMap.Size(json.icon.lb - json.icon.x + 10, -20)});
            marker.setLabel(label);
            map.addOverlay(marker);
            label.setStyle({
                borderColor: "#808080",
                color: "#333",
                cursor: "pointer"
            });

            (function () {
                var index = i;
                var _iw = createInfoWindow(i);
                var _marker = marker;
                _marker.addEventListener("click", function () {
                    this.openInfoWindow(_iw);
                });
                _iw.addEventListener("open", function () {
                    _marker.getLabel().hide();
                });
                _iw.addEventListener("close", function () {
                    _marker.getLabel().show();
                });
                label.addEventListener("click", function () {
                    _marker.openInfoWindow(_iw);
                });
                if (!!json.isOpen) {
                    label.hide();
                    _marker.openInfoWindow(_iw);
                }
            })()
        }
    }
    //创建InfoWindow
    function createInfoWindow(i) {
        var json = markerArr[i];
        var iw = new BMap.InfoWindow("<b class='iw_poi_title' title='" + json.title + "'>" + json.title + "</b><div class='iw_poi_content'>" + json.content + "</div>");
        return iw;
    }
    //创建一个Icon
    function createIcon(json) {
        var icon = new BMap.Icon("http://app.baidu.com/map/images/us_mk_icon.png", new BMap.Size(json.w, json.h), {
            imageOffset: new BMap.Size(-json.l, -json.t),
            infoWindowOffset: new BMap.Size(json.lb + 5, 1),
            offset: new BMap.Size(json.x, json.h)
        });
        return icon;
    }

    initMap();//创建和初始化地图

    $(".fater").hover(function () {
        $(".son").css("display", "block");
        $(".xila").css({"border-bottom": " 3px solid rgba(0,184,252,1)", "color": "rgba(0,184,252,1)"})
    }, function () {
        $(".son").css("display", "none");
        $(".xila").css({"border-bottom": " none", "color": "white"})
    });
    var click_a = $(".click_a");
    var height = $(".fenye").eq(j).height();

    var index;
    var key;
    var _obj = {};
    for (var i = 0; i < click_a.length; i++) {
        var j = i;
        (function (j) {
            click_a[j].onclick = function () {
                index = j;
                var height = $(".fenye").eq(j).height();
                var num = $(".fenye").eq(j).index();
                if (num == Number($(".fenye").eq(j).attr('value'))) {
                    $(".home").css({
                        "transform": "translate3d(0px, " + -height * index + "px, 0px)",
                        "transition-duration": "400ms"
                    });
                    $(".son").css("display", "none");
                    return index;
                } else {
                    alert("错误的")
                }
            };
            $('.fenye').eq(j).bind('mousewheel', function (event, delta) {
                if (delta == -1) {
                    index += 1;
                    if (index >= $(".fenye").length - 1) {
                        index = $(".fenye").length - 1;
                    }
                } else {
                    index -= 1;
                    if (index <= 0) {
                        index = 0
                    }
                }
                var height = $(".fenye").height();
                $(".home").css({
                    "transform": "translate3d(0px, " + -height * index + "px, 0px)",
                    "transition-duration": "400ms"
                });
                console.log("key----" + index);
                return false;
            });

        })(i);
    }
    if (index == undefined) {
        index = 0;
    } else {
        index = index;
    }
    $('.tijiao').click(function () {
        alert("亲，你还未登录")
    })
</script>
</body>
</html>